Platform Explorer / Nuxeo Platform 5.8

Component org.nuxeo.ecm.agenda.gadgets

Contributions

XML Source

<?xml version="1.0"?>
<component name="org.nuxeo.ecm.agenda.gadgets"
           version="1.0">

  <extension target="org.nuxeo.opensocial.gadgets.service"
             point="gadget">
    <documentation>
      This gadget displays incoming and past events readable by the current User. 
      Added into a SocialWorkspace, it displays only SocialWorkspace events.

      You have the possibility to display incoming events from:
      - a day
      - a week
      - a month

      How to include the agenda gadget in a JSF context:
      <code>
        <div class="gadget-agenda threeQuarterWidth"></div>
        <script type="text/javascript">
          jQuery('.gadget-agenda').openSocialGadget({
            baseURL: '#{baseURL}',
            language: '#{localeSelector.language}',
            gadgetDefs: [
              { specUrl: '#{gadgetsBaseURL}/site/gadgets/agenda/agenda.xml',
                title: 'My most liked document',
                userPrefs: { },
                displayTitleBar: false,
                width: '100%'
              }
            ]
          });
        </script>
      </code>

      How to include the agenda gadget in a WebEngine page:
      <code>
        <link rel="stylesheet" href="${contextPath}/css/opensocial/light-container-gadgets.css" />
        <script type="text/javascript" src="${contextPath}/opensocial/gadgets/js/rpc.js?c=1"></script>
        <script type="text/javascript" src="${contextPath}/js/?scripts=jquery.js|opensocial/cookies.js|opensocial/util.js|opensocial/gadgets.js|opensocial/cookiebaseduserprefstore.js|opensocial/jquery.opensocial.gadget.js"></script>

        <div class="gadget-agenda gadgets-gadget-chrome"></div>
        <script type="text/javascript">
          $('.gadget-agenda').openSocialGadget({
            baseURL: '${contextPath}' + '/',
            language: '${Context.locale.language}',
            gadgetDefs: [{
              specUrl : '${Runtime.getProperty('nuxeo.loopback.url')}/site/gadgets/agenda/agenda.xml',
              userPrefs: { },
              displayTitleBar: false,
              width: '100%'
            }]
          });
        </script>
      </code>
    </documentation>
    <internalGadget name="agenda" disabled="false">
      <mountPoint>/agenda</mountPoint>
      <entryPoint>agenda.xml</entryPoint>
      <category>gadget.category.utilities</category>
      <icon>gadget-agenda.png</icon>
    </internalGadget>
  </extension>
</component>